<!DOCTYPE html>
<html lang="en">
<!-- Mirrored from www.zi-han.net/theme/hplus/login_v2.html by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 20 Jan 2016 14:19:49 GMT -->
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">

    <title>阿贝尔</title>
    <meta name="keywords" content="阿贝尔 IM">
    <meta name="description" content="阿贝尔 IM基于GO语言开发的即时通讯">
    <link href="/static/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/static/css/animate.min.css" rel="stylesheet">
    <link href="/static/css/style.min.css" rel="stylesheet">
    <link href="/static/css/login.min.css" rel="stylesheet">
    <!--[if lt IE 9]>
    <meta http-equiv="refresh" content="0;ie.html" />
    <![endif]-->
    <script>
        if (window.top!==window.self) {
            window.top.location=window.location
        };
    </script>

</head>

<body class="signin">
<div class="signinpanel" id="app">
    <div class="row">
        <div class="col-sm-7">
            <div class="signin-info" style="color: #000000;">
                <div class="m-b"></div>
                <h4>欢迎使用 <strong> 阿贝尔</strong></h4>
                <ul class="m-b">
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势一</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势二</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势三</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势四</li>
                    <li><i class="fa fa-arrow-circle-o-right m-r-xs"></i> 优势五</li>
                </ul>
                <strong>还没有账号？ <a href="/register">立即注册&raquo;</a></strong>
            </div>
        </div>
        <div class="col-sm-5" style="background: #dddddd;">
            <form method="post">
                <p class="m-t-md">登录 阿贝尔</p>
                <input type="text" class="form-control uname" v-model="username" placeholder="用户名" />
                <input type="password" class="form-control pword m-b" v-model="password" placeholder="密码" />
                <a href="#">忘记密码了？</a>
                <button class="btn btn-success btn-block" type="button" @click="login">登录</button>
            </form>
        </div>
    </div>
    <div class="signup-footer"  style="color: #000000;">
        <div class="pull-left">
            &copy; 2020 All Rights Reserved. <a href="https://www.api996.cn" target="_blank">阿贝尔</a>
        </div>
    </div>
</div>
</body>
<script src="/static/js/jquery.min.js?v=2.1.4"></script>
<script src="/static/js/ajaxDataController.js"></script>
<script src="/static/js/vue.min.js"></script>
<script>
    var vue = new Vue({
        el:"#app",
        data:{
            username:"",
            password:""
        },
        created: function () {

        },
        methods:{
            login:function(){
                myAjax().post("/userLogin",{username:this.username,password:this.password},function (data) {
                    if(data.code==200){
                        localStorage.setItem("userId",data.data.user_id);
                        localStorage.setItem("name",data.data.name);
                        window.location.href="/main";
                    }else{
                        swal({title:"提示",text:data.msg,type: "warning"})
                    }
                });
            }
        }
    });
</script>
</html>
